package wayden;
import java.util.Map;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class Welcome extends ActionSupport{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String id;
	Map session;
	
	public String welcome() {
		session = ActionContext.getContext().getSession();
		//if ("".equals(session.get("user").toString()))
		
		//if (!session.containsKey("user"))
			//session.put("user", getId());
		//System.err.println("fe");
		setId(session.get("user").toString());
		System.err.println(session.get("user"));
		System.err.println(getId());
		
		    
		    if (session.get("user")==null){
			System.err.println("ssssss");
			return "error";
		    } 
		    
		
		//System.err.println(session.get("user").toString());
		return "success";
	}
	
	public void setId(String id) {
		
		this.id = id;
		

		
	}
	
	public String getId() {
		return this.id;
	}
	
	
	
}
